# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.DFAReporting.V4.Model.Placement do
  @moduledoc """
  Contains properties of a placement.

  ## Attributes

  *   `placementGroupIdDimensionValue` (*type:* `GoogleApi.DFAReporting.V4.Model.DimensionValue.t`, *default:* `nil`) - Dimension value for the ID of the placement group. This is a read-only, auto-generated field.
  *   `advertiserIdDimensionValue` (*type:* `GoogleApi.DFAReporting.V4.Model.DimensionValue.t`, *default:* `nil`) - Dimension value for the ID of the advertiser. This is a read-only, auto-generated field.
  *   `sslRequired` (*type:* `boolean()`, *default:* `nil`) - Whether creatives assigned to this placement must be SSL-compliant.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Name of this placement.This is a required field and must be less than or equal to 512 characters long.
  *   `videoActiveViewOptOut` (*type:* `boolean()`, *default:* `nil`) - Whether Verification and ActiveView are disabled for in-stream video creatives for this placement. The same setting videoActiveViewOptOut exists on the site level -- the opt out occurs if either of these settings are true. These settings are distinct from DirectorySites.settings.activeViewOptOut or Sites.siteSettings.activeViewOptOut which only apply to display ads. However, Accounts.activeViewOptOut opts out both video traffic, as well as display ads, from Verification and ActiveView.
  *   `compatibility` (*type:* `String.t`, *default:* `nil`) - Placement compatibility. DISPLAY and DISPLAY_INTERSTITIAL refer to rendering on desktop, on mobile devices or in mobile apps for regular or interstitial ads respectively. APP and APP_INTERSTITIAL are no longer allowed for new placement insertions. Instead, use DISPLAY or DISPLAY_INTERSTITIAL. IN_STREAM_VIDEO refers to rendering in in-stream video ads developed with the VAST standard. This field is required on insertion.
  *   `externalId` (*type:* `String.t`, *default:* `nil`) - External ID for this placement.
  *   `lastModifiedInfo` (*type:* `GoogleApi.DFAReporting.V4.Model.LastModifiedInfo.t`, *default:* `nil`) - Information about the most recent modification of this placement. This is a read-only field.
  *   `campaignIdDimensionValue` (*type:* `GoogleApi.DFAReporting.V4.Model.DimensionValue.t`, *default:* `nil`) - Dimension value for the ID of the campaign. This is a read-only, auto-generated field.
  *   `vpaidAdapterChoice` (*type:* `String.t`, *default:* `nil`) - VPAID adapter setting for this placement. Controls which VPAID format the measurement adapter will use for in-stream video creatives assigned to this placement. *Note:* Flash is no longer supported. This field now defaults to HTML5 when the following values are provided: FLASH, BOTH.
  *   `advertiserId` (*type:* `String.t`, *default:* `nil`) - Advertiser ID of this placement. This field can be left blank.
  *   `tagSetting` (*type:* `GoogleApi.DFAReporting.V4.Model.TagSetting.t`, *default:* `nil`) - Tag settings for this placement.
  *   `kind` (*type:* `String.t`, *default:* `nil`) - Identifies what kind of resource this is. Value: the fixed string "dfareporting#placement".
  *   `createInfo` (*type:* `GoogleApi.DFAReporting.V4.Model.LastModifiedInfo.t`, *default:* `nil`) - Information about the creation of this placement. This is a read-only field.
  *   `directorySiteId` (*type:* `String.t`, *default:* `nil`) - Directory site ID of this placement. On insert, you must set either this field or the siteId field to specify the site associated with this placement. This is a required field that is read-only after insertion.
  *   `lookbackConfiguration` (*type:* `GoogleApi.DFAReporting.V4.Model.LookbackConfiguration.t`, *default:* `nil`) - Lookback window settings for this placement.
  *   `partnerWrappingData` (*type:* `GoogleApi.DFAReporting.V4.Model.MeasurementPartnerWrappingData.t`, *default:* `nil`) - Measurement partner provided settings for a wrapped placement.
  *   `wrappingOptOut` (*type:* `boolean()`, *default:* `nil`) - Whether this placement opts out of tag wrapping.
  *   `directorySiteIdDimensionValue` (*type:* `GoogleApi.DFAReporting.V4.Model.DimensionValue.t`, *default:* `nil`) - Dimension value for the ID of the directory site. This is a read-only, auto-generated field.
  *   `conversionDomainOverride` (*type:* `GoogleApi.DFAReporting.V4.Model.PlacementConversionDomainOverride.t`, *default:* `nil`) - Optional. Conversion domain overrides for a placement.
  *   `siteIdDimensionValue` (*type:* `GoogleApi.DFAReporting.V4.Model.DimensionValue.t`, *default:* `nil`) - Dimension value for the ID of the site. This is a read-only, auto-generated field.
  *   `placementGroupId` (*type:* `String.t`, *default:* `nil`) - ID of this placement's group, if applicable.
  *   `siteServed` (*type:* `boolean()`, *default:* `nil`) - Optional. Whether the ads in the placement are served by another platform and CM is only used for tracking or they are served by CM. A false value indicates the ad is served by CM.
  *   `size` (*type:* `GoogleApi.DFAReporting.V4.Model.Size.t`, *default:* `nil`) - Size associated with this placement. When inserting or updating a placement, only the size ID field is used. This field is required on insertion.
  *   `comment` (*type:* `String.t`, *default:* `nil`) - Comments for this placement.
  *   `paymentSource` (*type:* `String.t`, *default:* `nil`) - Payment source for this placement. This is a required field that is read-only after insertion.
  *   `primary` (*type:* `boolean()`, *default:* `nil`) - Whether this placement is the primary placement of a roadblock (placement group). You cannot change this field from true to false. Setting this field to true will automatically set the primary field on the original primary placement of the roadblock to false, and it will automatically set the roadblock's primaryPlacementId field to the ID of this placement.
  *   `activeStatus` (*type:* `String.t`, *default:* `nil`) - Whether this placement is active, inactive, archived or permanently archived.
  *   `paymentApproved` (*type:* `boolean()`, *default:* `nil`) - Whether payment was approved for this placement. This is a read-only field relevant only to publisher-paid placements.
  *   `publisherUpdateInfo` (*type:* `GoogleApi.DFAReporting.V4.Model.LastModifiedInfo.t`, *default:* `nil`) - Information about the last publisher update. This is a read-only field.
  *   `tagFormats` (*type:* `list(String.t)`, *default:* `nil`) - Tag formats to generate for this placement. This field is required on insertion. Acceptable values are: - "PLACEMENT_TAG_STANDARD" - "PLACEMENT_TAG_IFRAME_JAVASCRIPT" - "PLACEMENT_TAG_IFRAME_ILAYER" - "PLACEMENT_TAG_INTERNAL_REDIRECT" - "PLACEMENT_TAG_JAVASCRIPT" - "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT" - "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT" - "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT" - "PLACEMENT_TAG_CLICK_COMMANDS" - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH" - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3" - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_4" - "PLACEMENT_TAG_TRACKING" - "PLACEMENT_TAG_TRACKING_IFRAME" - "PLACEMENT_TAG_TRACKING_JAVASCRIPT" 
  *   `siteId` (*type:* `String.t`, *default:* `nil`) - Site ID associated with this placement. On insert, you must set either this field or the directorySiteId field to specify the site associated with this placement. This is a required field that is read-only after insertion.
  *   `placementStrategyId` (*type:* `String.t`, *default:* `nil`) - ID of the placement strategy assigned to this placement.
  *   `adServingPlatformId` (*type:* `String.t`, *default:* `nil`) - Optional. Ad serving platform ID to identify the ad serving platform used by the placement. Measurement partners can use this field to add ad-server specific macros. Possible values are: * `1`, Adelphic * `2`, Adform * `3`, Adobe * `4`, Amobee * `5`, Basis (Centro) * `6`, Beeswax * `7`, Amazon * `8`, DV360 (DBM) * `9`, Innovid * `10`, MediaMath * `11`, Roku OneView DSP * `12`, TabMo Hawk * `13`, The Trade Desk * `14`, Xandr Invest DSP * `15`, Yahoo DSP * `16`, Zeta Global * `17`, Scaleout * `18`, Bidtellect * `19`, Unicorn * `20`, Teads * `21`, Quantcast * `22`, Cognitiv
  *   `additionalSizes` (*type:* `list(GoogleApi.DFAReporting.V4.Model.Size.t)`, *default:* `nil`) - Additional sizes associated with this placement. When inserting or updating a placement, only the size ID field is used.
  *   `campaignId` (*type:* `String.t`, *default:* `nil`) - Campaign ID of this placement. This field is a required field on insertion.
  *   `adBlockingOptOut` (*type:* `boolean()`, *default:* `nil`) - Whether this placement opts out of ad blocking. When true, ad blocking is disabled for this placement. When false, the campaign and site settings take effect.
  *   `status` (*type:* `String.t`, *default:* `nil`) - Third-party placement status.
  *   `idDimensionValue` (*type:* `GoogleApi.DFAReporting.V4.Model.DimensionValue.t`, *default:* `nil`) - Dimension value for the ID of this placement. This is a read-only, auto-generated field.
  *   `keyName` (*type:* `String.t`, *default:* `nil`) - Key name of this placement. This is a read-only, auto-generated field.
  *   `contentCategoryId` (*type:* `String.t`, *default:* `nil`) - ID of the content category assigned to this placement.
  *   `videoSettings` (*type:* `GoogleApi.DFAReporting.V4.Model.VideoSettings.t`, *default:* `nil`) - A collection of settings which affect video creatives served through this placement. Applicable to placements with IN_STREAM_VIDEO compatibility.
  *   `pricingSchedule` (*type:* `GoogleApi.DFAReporting.V4.Model.PricingSchedule.t`, *default:* `nil`) - Pricing schedule of this placement. This field is required on insertion, specifically subfields startDate, endDate and pricingType.
  *   `id` (*type:* `String.t`, *default:* `nil`) - ID of this placement. This is a read-only, auto-generated field.
  *   `accountId` (*type:* `String.t`, *default:* `nil`) - Account ID of this placement. This field can be left blank.
  *   `subaccountId` (*type:* `String.t`, *default:* `nil`) - Subaccount ID of this placement. This field can be left blank.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :placementGroupIdDimensionValue =>
            GoogleApi.DFAReporting.V4.Model.DimensionValue.t() | nil,
          :advertiserIdDimensionValue => GoogleApi.DFAReporting.V4.Model.DimensionValue.t() | nil,
          :sslRequired => boolean() | nil,
          :name => String.t() | nil,
          :videoActiveViewOptOut => boolean() | nil,
          :compatibility => String.t() | nil,
          :externalId => String.t() | nil,
          :lastModifiedInfo => GoogleApi.DFAReporting.V4.Model.LastModifiedInfo.t() | nil,
          :campaignIdDimensionValue => GoogleApi.DFAReporting.V4.Model.DimensionValue.t() | nil,
          :vpaidAdapterChoice => String.t() | nil,
          :advertiserId => String.t() | nil,
          :tagSetting => GoogleApi.DFAReporting.V4.Model.TagSetting.t() | nil,
          :kind => String.t() | nil,
          :createInfo => GoogleApi.DFAReporting.V4.Model.LastModifiedInfo.t() | nil,
          :directorySiteId => String.t() | nil,
          :lookbackConfiguration =>
            GoogleApi.DFAReporting.V4.Model.LookbackConfiguration.t() | nil,
          :partnerWrappingData =>
            GoogleApi.DFAReporting.V4.Model.MeasurementPartnerWrappingData.t() | nil,
          :wrappingOptOut => boolean() | nil,
          :directorySiteIdDimensionValue =>
            GoogleApi.DFAReporting.V4.Model.DimensionValue.t() | nil,
          :conversionDomainOverride =>
            GoogleApi.DFAReporting.V4.Model.PlacementConversionDomainOverride.t() | nil,
          :siteIdDimensionValue => GoogleApi.DFAReporting.V4.Model.DimensionValue.t() | nil,
          :placementGroupId => String.t() | nil,
          :siteServed => boolean() | nil,
          :size => GoogleApi.DFAReporting.V4.Model.Size.t() | nil,
          :comment => String.t() | nil,
          :paymentSource => String.t() | nil,
          :primary => boolean() | nil,
          :activeStatus => String.t() | nil,
          :paymentApproved => boolean() | nil,
          :publisherUpdateInfo => GoogleApi.DFAReporting.V4.Model.LastModifiedInfo.t() | nil,
          :tagFormats => list(String.t()) | nil,
          :siteId => String.t() | nil,
          :placementStrategyId => String.t() | nil,
          :adServingPlatformId => String.t() | nil,
          :additionalSizes => list(GoogleApi.DFAReporting.V4.Model.Size.t()) | nil,
          :campaignId => String.t() | nil,
          :adBlockingOptOut => boolean() | nil,
          :status => String.t() | nil,
          :idDimensionValue => GoogleApi.DFAReporting.V4.Model.DimensionValue.t() | nil,
          :keyName => String.t() | nil,
          :contentCategoryId => String.t() | nil,
          :videoSettings => GoogleApi.DFAReporting.V4.Model.VideoSettings.t() | nil,
          :pricingSchedule => GoogleApi.DFAReporting.V4.Model.PricingSchedule.t() | nil,
          :id => String.t() | nil,
          :accountId => String.t() | nil,
          :subaccountId => String.t() | nil
        }

  field(:placementGroupIdDimensionValue, as: GoogleApi.DFAReporting.V4.Model.DimensionValue)
  field(:advertiserIdDimensionValue, as: GoogleApi.DFAReporting.V4.Model.DimensionValue)
  field(:sslRequired)
  field(:name)
  field(:videoActiveViewOptOut)
  field(:compatibility)
  field(:externalId)
  field(:lastModifiedInfo, as: GoogleApi.DFAReporting.V4.Model.LastModifiedInfo)
  field(:campaignIdDimensionValue, as: GoogleApi.DFAReporting.V4.Model.DimensionValue)
  field(:vpaidAdapterChoice)
  field(:advertiserId)
  field(:tagSetting, as: GoogleApi.DFAReporting.V4.Model.TagSetting)
  field(:kind)
  field(:createInfo, as: GoogleApi.DFAReporting.V4.Model.LastModifiedInfo)
  field(:directorySiteId)
  field(:lookbackConfiguration, as: GoogleApi.DFAReporting.V4.Model.LookbackConfiguration)
  field(:partnerWrappingData, as: GoogleApi.DFAReporting.V4.Model.MeasurementPartnerWrappingData)
  field(:wrappingOptOut)
  field(:directorySiteIdDimensionValue, as: GoogleApi.DFAReporting.V4.Model.DimensionValue)

  field(:conversionDomainOverride,
    as: GoogleApi.DFAReporting.V4.Model.PlacementConversionDomainOverride
  )

  field(:siteIdDimensionValue, as: GoogleApi.DFAReporting.V4.Model.DimensionValue)
  field(:placementGroupId)
  field(:siteServed)
  field(:size, as: GoogleApi.DFAReporting.V4.Model.Size)
  field(:comment)
  field(:paymentSource)
  field(:primary)
  field(:activeStatus)
  field(:paymentApproved)
  field(:publisherUpdateInfo, as: GoogleApi.DFAReporting.V4.Model.LastModifiedInfo)
  field(:tagFormats, type: :list)
  field(:siteId)
  field(:placementStrategyId)
  field(:adServingPlatformId)
  field(:additionalSizes, as: GoogleApi.DFAReporting.V4.Model.Size, type: :list)
  field(:campaignId)
  field(:adBlockingOptOut)
  field(:status)
  field(:idDimensionValue, as: GoogleApi.DFAReporting.V4.Model.DimensionValue)
  field(:keyName)
  field(:contentCategoryId)
  field(:videoSettings, as: GoogleApi.DFAReporting.V4.Model.VideoSettings)
  field(:pricingSchedule, as: GoogleApi.DFAReporting.V4.Model.PricingSchedule)
  field(:id)
  field(:accountId)
  field(:subaccountId)
end

defimpl Poison.Decoder, for: GoogleApi.DFAReporting.V4.Model.Placement do
  def decode(value, options) do
    GoogleApi.DFAReporting.V4.Model.Placement.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.DFAReporting.V4.Model.Placement do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
